import Vue from 'vue'
import VueRouter from 'vue-router'
import HomeView from '../views/HomeView.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    component: HomeView,
    redirect:'/sys-admin/index',
    children: [
      {
        path: '/sys-admin/index', // http://localhost:9000/sys-admin/index
        component: () => import('../views/sys-admin/AdminIndexView.vue')
      },
      {
        path: '/sys-admin/temp/teacher/add-new', // http://localhost:9000/sys-admin/temp/brand/add-new
        component: () => import('../views/sys-admin/temp/TeacherAddNewView.vue')
      },
      {
        path: '/sys-admin/temp/teacher/list', // http://localhost:9000/sys-admin/temp/admin/list
        component: () => import('../views/sys-admin/temp/TeacherListView.vue')
      },
      {
        path: '/sys-admin/temp/student/add-new', // http://localhost:9000/sys-admin/temp/brand/add-new
        component: () => import('../views/sys-admin/temp/StudentAddNewView.vue')
      },
      {
        path: '/sys-admin/temp/student/list', // http://localhost:9000/sys-admin/temp/admin/list
        component: () => import('../views/sys-admin/temp/StudentListView.vue')
      },
      {
        path: '/sys-admin/temp/order/add-new', // http://localhost:9000/sys-admin/temp/brand/add-new
        component: () => import('../views/sys-admin/temp/OrderAddNewView.vue')
      },
      {
        path: '/sys-admin/temp/order/list', // http://localhost:9000/sys-admin/temp/admin/list
        component: () => import('../views/sys-admin/temp/OrderListView.vue')
      },
      {
        path: '/sys-admin/temp/salary/add-new', // http://localhost:9000/sys-admin/temp/brand/add-new
        component: () => import('../views/sys-admin/temp/SalaryAddNewView.vue')
      },
      {
        path: '/sys-admin/temp/salary/list', // http://localhost:9000/sys-admin/temp/admin/list
        component: () => import('../views/sys-admin/temp/SalaryListView.vue')
      },
      {
        path: '/sys-admin/temp/job/add-new', // http://localhost:9000/sys-admin/temp/brand/add-new
        component: () => import('../views/sys-admin/temp/JobAddNewView.vue')
      },
      {
        path: '/sys-admin/temp/job/list', // http://localhost:9000/sys-admin/temp/admin/list
        component: () => import('../views/sys-admin/temp/JobListView.vue')
      },
      {
        path: '/sys-admin/temp/course/add-new', // http://localhost:9000/sys-admin/temp/brand/add-new
        component: () => import('../views/sys-admin/temp/CourseAddNewView.vue')
      },
      {
        path: '/sys-admin/temp/course/list', // http://localhost:9000/sys-admin/temp/admin/list
        component: () => import('../views/sys-admin/temp/CourseListView.vue')
      },
      {
        path: '/sys-admin/temp/class/add-new', // http://localhost:9000/sys-admin/temp/brand/add-new
        component: () => import('../views/sys-admin/temp/ClassAddNewView.vue')
      },
      {
        path: '/sys-admin/temp/class/list', // http://localhost:9000/sys-admin/temp/admin/list
        component: () => import('../views/sys-admin/temp/ClassListView.vue')
      },


    ]
  },

  {
    path: '/login',
    component: () => import('../views/LoginView.vue')
  }


]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
